package Data20171221;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by Aguest on 2017/12/21.
 */
public class test {
    public static void main(String[] args) {
            Matcher matcher= Pattern.compile("Java(\\d+)级信本2班（\\d+）张三")
                    .matcher("面向对象程序设计JAVA级信本2班张三作业1.doc");
            while (matcher.find()){
                System.out.println(matcher.group(1));
                System.out.println(matcher.group(2));
            }
    }
}
